Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reloading support via import.meta.hot #269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Hot reloading support via import.meta.hot #269

wants to merge 1 commit into from

Conversation

guybedford
Copy link
Owner

@guybedford guybedford commented Mar 8, 2022

This implements the import.meta.hot API from Vite (https://vitejs.dev/guide/api-hmr.html).

The hot reloader is implemented as an extension using initialized hooks that executes before es-module-shims.

In addition this PR adds support for subgraphPassthrough: true, which effectively disables the performance feature from #208. This at least provides a way around the instancing issues which seems useful.

@guybedford guybedford changed the title WIP: import.meta.hot support Hot reloading support via import.meta.hot May 1, 2022
@abhishiv
Copy link

Hey @guybedford

Just found this PR. Are you still planning on merging it?

#380 (comment)

Thanks for sharing. There is actually a hot reload implementation for this project in #269, I just never landed it (not sure why... it works fine!). The main issue is just that it needs integration with a server that can send the reload events, but Chomp does support it as well.

If you are hesitant on merging it because of this reason, maybe I suggest instead of baking in websocket support, a function should be exposed which anyone can call in order to process these messages.

I'm interested in this, because i'm building a browser based IDE at @gratico, and hence I think a this approach is more generic and useful than making it dependent on websocket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants